package com.example.comment.base.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author QingZeyu
 * @date 2024/4/30 17:16
 */
@ApiModel(value = "评论表")
@Data
@TableName("comment")
public class Comment {
/** 主键 */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(name = "主键")
    private Long id;
    /** 父评论id */
    @ApiModelProperty(name = "父评论id")
    private Long parentId;
    /** 根评论id */
    @ApiModelProperty(name = "根评论id")
    private Long rootId ;
    /** 关联id */
    @ApiModelProperty(name = "关联id")
    private Long referenceId;
    /** 用户id */
    @ApiModelProperty(name = "用户id")
    private Long userId;
    /** 回复用户id */
    @ApiModelProperty(name = "回复用户id")
    private Long toUserId;
    /** 评论内容 */
    @ApiModelProperty(name = "评论内容")
    private String content;
    /** 图片链接 */
    @ApiModelProperty(name = "图片链接")
    private String pictureUrl;
    /** 评论类型 */
    @ApiModelProperty(name = "评论类型")
    private String type;
    /** 审核状态 */
    @ApiModelProperty(name = "审核状态")
    private String auditStatus ;
    /** 审核人 */
    @ApiModelProperty(name = "审核人")
    private Long  auditBy ;
    /** 审核时间 */
    @ApiModelProperty(name = "审核时间")
    private Date auditTime ;
    /** 显示状态 */
    @ApiModelProperty(name = "显示状态")
    private Boolean showStatus;
    /** 创建人 */
    @ApiModelProperty(name = "创建人")
    private Long createBy;
    /** 创建时间 */
    @ApiModelProperty(name = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime ;
    /** 删除标记 */
    @ApiModelProperty(name = "删除标记")
    private Boolean delFlag;
}
